﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChuyenDongVatLy
{

    public class Camera2
    {
        public Camera2() { xcamera = 0; ycamera = 0; }
        public float xcamera;
        public float ycamera;
        public void UpdateCamera(float xObject, float yObject)
        {
            if (xcamera <= xObject - 600)
            {
                xcamera = xObject - 600;
            }
            else if (xObject <= xcamera + 200)
            {
                xcamera = xObject - 200;

            }
            if (yObject < ycamera + 100)
            {
                ycamera = yObject - 100;
            }

        }
    }
}
